<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>企业列表</title>
<!--  css引入-->
<link href="../css/manageadmin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">用户列表</a></li>
  </ul>
</div>
<div class="rightinfo">
  <div class="tools">
    <ul class="toolbar">
      <li class="click"><span><img src="../images/t01.png" /></span><a href="../manage/userAdd.html">添加</a></li>
      <li class="click"><span><img src="../images/t02.png" /></span><a href="../manage/updateSelect">修改</a></li>
      <li><span><img src="../images/t03.png" /></span><a href="/userDelete">删除</a></li>
    </ul>
    <iframe src="../manage/userSearch.html" scrolling="no" frameborder="0" width="400" height="42"></iframe>
  </div>
  <table class="imgtable">
    <thead>
      <tr>
        <th ><input name="" type="checkbox" value="" checked="checked"/></th>
        <th>用户登录名</th>
        <th>用户真实姓名</th>
        <th>用户Email</th>
        <th>用户角色</th>
        <th>用户状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
    <tr th:each="user : ${users}" height="50px">
      <td><input type="checkbox" name="userId" th:value="${user.userId}"/></td>
      <td th:text="${user.userLogname}">QST</td>
      <td th:text="${user.userRealname}">青软实训</td>
      <td th:text="${user.userEmail}">qst@test.com</td>
      <span th:text="(${user.userRole == 1}) ? '系统管理员' : '普通用户'"></span>

      <td th:text="${user.userState == 1} ? '启用' : '禁用'">启用</td>
      <td>
        <a th:href="@{/updateSelect(userId=${user.userId})}" class="tablelink">修改</a>
        &nbsp;&nbsp;
        <a th:href="@{/userDelete(userId=${user.userId})}" class="tablelink">删除</a>
      </td>
    </tr>
    </tbody>
  </table>
  <div class="pagin">
    <div class="message">
      共<i class="blue" th:text="${pageBean.totalPages}"></i>页，
      当前显示第<i class="blue" th:text="${pageBean.pageNo}"></i>页
    </div>
    <ul class="paginList">
      <li class="paginItem"><a th:href="@{/user/list(pageNo=1)}">首页</a></li>
      <li class="paginItem" th:if="${pageBean.hasPreviousPage()}">
        <a th:href="@{/user/list(pageNo=${pageBean.pageNo - 1})}">上一页</a>
      </li>
      <li class="paginItem" th:if="${pageBean.hasNextPage()}">
        <a th:href="@{/user/list(pageNo=${pageBean.pageNo+1})}">下一页</a>
      </li>
      <li class="paginItem">
        <a th:href="@{/user/list(pageNo=${pageBean.totalPages})}">尾页</a>
      </li>
    </ul>
  </div>
</div>
</body>
</html>
